﻿var map;
function initialize() {
    if (navigator.geolocation)
        navigator.geolocation.getCurrentPosition(function (pos) {
            var myOptions = {
                center: new google.maps.LatLng(pos.coords.latitude, pos.coords.longitude),
                zoom: 16,
                mapTypeId: google.maps.MapTypeId.ROADMAP
            };
            map = new google.maps.Map(document.getElementById("map_canvas"),
            myOptions);
        }, function (error) {
            var myOptions = {
                //center: new google.maps.LatLng(pos.coords.latitude, pos.coords.longitude),
                zoom: 16,
                mapTypeId: google.maps.MapTypeId.ROADMAP
            };
            map = new google.maps.Map(document.getElementById("map_canvas"),
            myOptions);
        }
                );
}
function HienThiDanhSach() {
    //            $.get("http://localhost:1790/Service1.svc/diachi",getcoords);
    //        }
    //        function getcoords(data) {
    //            for (var i = 0; i < data.length;i++ ) {
    var latLng = new google.maps.LatLng(10.76284, 106.682114);
    var marker = new google.maps.Marker({
        position: latLng,
        map: map
    });
    //            }
}